In this project, we investigated whether the human brain can extract emotional information from a series of faces flickering at specific frequencies.
# setwd(paste0(getwd(), "/SSR/regular_freq")) # set working subdir
filenames <- c( # variable with file names
# participants x orientation x regularity
rep(list.files(pattern = ".csv")[1], each = (31 * 2 * 3)), # exp1_hiVar
rep(list.files(pattern = ".csv")[2], each = (31 * 2 * 3)), # exp1_loVar
rep(list.files(pattern = ".csv")[3], each = (30 * 2 * 3)), # exp2_hiVar
rep(list.files(pattern = ".csv")[4], each = (30 * 2 * 3)), # exp2_loVar
rep(list.files(pattern = ".csv")[5], each = (16 * 2 * 3)), # pilot1
rep(list.files(pattern = ".csv")[6], each = (16 * 2 * 3)), # pilot2_hiVar
rep(list.files(pattern = ".csv")[7], each = (16 * 2 * 3)) # pilot2_loVar
)
EmoSSR.data <- list.files(pattern = ".csv") %>% # list of csv files in current directory
map_df(~ read_csv(.)) %>% # apply read_csv to file list
mutate(
filenames = factor(filenames, # add filenames
levels = c(
unique(filenames)[5], unique(filenames)[6], unique(filenames)[7], # sort pilots first
unique(filenames)[1], unique(filenames)[2], unique(filenames)[3], unique(filenames)[4]
)
),
# create, rename, and recode variables
experiment = factor(
case_when(
grepl("pilot1", filenames) ~ "pilot1",
grepl("pilot2", filenames) ~ "pilot2",
grepl("exp1", filenames) ~ "exp1",
grepl("exp2", filenames) ~ "exp2"
),
levels = c("pilot1", "pilot2", "exp1", "exp2")
),
variability = as.factor(
case_when(
grepl("hiVar", filenames) ~ "high",
grepl("loVar", filenames) ~ "low"
)
),
participant = as.factor(subj),
orientation = recode(
factor(face_dir),
"1" = "upright", "2" = "inverted"
),
regularity = recode(
factor(emo),
"1" = "angry", "2" = "neutral", "3" = "irregular"
)
) %>%
unite(condition, c(orientation, regularity, variability), sep = "_", remove = FALSE) %>%
dplyr::select(experiment, participant, orientation, regularity, variability, condition, CS = "data")
We conducted 2 pilots and 2 main experiments.
summary.EmoSSR.data <- summarySEwithin(
data = EmoSSR.data,
measurevar = "CS",
betweenvars = "experiment",
withinvars = c("orientation", "regularity", "variability"),
idvar = "participant"
) %>%
mutate(
CI.95.low = CS - ci,
CI.95.high = CS + ci
) %>%
dplyr::select(-c(sd, se, ci))
kable(summary.EmoSSR.data, digits = 2)
| pilot1 |
upright |
angry |
NA |
16 |
0.03 |
0.01 |
0.04 |
| pilot1 |
upright |
neutral |
NA |
16 |
0.05 |
0.04 |
0.06 |
| pilot1 |
upright |
irregular |
NA |
16 |
0.00 |
0.00 |
0.01 |
| pilot1 |
inverted |
angry |
NA |
16 |
0.03 |
0.01 |
0.04 |
| pilot1 |
inverted |
neutral |
NA |
16 |
0.05 |
0.04 |
0.06 |
| pilot1 |
inverted |
irregular |
NA |
16 |
0.00 |
-0.01 |
0.01 |
| pilot2 |
upright |
angry |
high |
16 |
0.06 |
0.02 |
0.09 |
| pilot2 |
upright |
angry |
low |
16 |
0.02 |
0.00 |
0.04 |
| pilot2 |
upright |
neutral |
high |
16 |
0.09 |
0.06 |
0.12 |
| pilot2 |
upright |
neutral |
low |
16 |
0.04 |
0.03 |
0.05 |
| pilot2 |
upright |
irregular |
high |
16 |
-0.02 |
-0.04 |
-0.01 |
| pilot2 |
upright |
irregular |
low |
16 |
-0.02 |
-0.03 |
-0.01 |
| pilot2 |
inverted |
angry |
high |
16 |
0.03 |
0.02 |
0.04 |
| pilot2 |
inverted |
angry |
low |
16 |
0.03 |
0.01 |
0.05 |
| pilot2 |
inverted |
neutral |
high |
16 |
0.09 |
0.06 |
0.12 |
| pilot2 |
inverted |
neutral |
low |
16 |
0.03 |
0.01 |
0.05 |
| pilot2 |
inverted |
irregular |
high |
16 |
-0.01 |
-0.02 |
0.00 |
| pilot2 |
inverted |
irregular |
low |
16 |
-0.03 |
-0.04 |
-0.01 |
| exp1 |
upright |
angry |
high |
31 |
0.04 |
0.03 |
0.05 |
| exp1 |
upright |
angry |
low |
31 |
0.03 |
0.02 |
0.04 |
| exp1 |
upright |
neutral |
high |
31 |
0.06 |
0.04 |
0.07 |
| exp1 |
upright |
neutral |
low |
31 |
0.04 |
0.02 |
0.05 |
| exp1 |
upright |
irregular |
high |
31 |
0.01 |
0.00 |
0.02 |
| exp1 |
upright |
irregular |
low |
31 |
0.01 |
0.00 |
0.02 |
| exp1 |
inverted |
angry |
high |
31 |
0.03 |
0.02 |
0.04 |
| exp1 |
inverted |
angry |
low |
31 |
0.02 |
0.01 |
0.03 |
| exp1 |
inverted |
neutral |
high |
31 |
0.04 |
0.03 |
0.05 |
| exp1 |
inverted |
neutral |
low |
31 |
0.03 |
0.02 |
0.04 |
| exp1 |
inverted |
irregular |
high |
31 |
0.00 |
0.00 |
0.01 |
| exp1 |
inverted |
irregular |
low |
31 |
0.00 |
0.00 |
0.01 |
| exp2 |
upright |
angry |
high |
30 |
0.04 |
0.03 |
0.05 |
| exp2 |
upright |
angry |
low |
30 |
0.02 |
0.01 |
0.03 |
| exp2 |
upright |
neutral |
high |
30 |
0.06 |
0.05 |
0.08 |
| exp2 |
upright |
neutral |
low |
30 |
0.03 |
0.02 |
0.04 |
| exp2 |
upright |
irregular |
high |
30 |
0.00 |
0.00 |
0.01 |
| exp2 |
upright |
irregular |
low |
30 |
0.01 |
0.00 |
0.02 |
| exp2 |
inverted |
angry |
high |
30 |
0.04 |
0.02 |
0.05 |
| exp2 |
inverted |
angry |
low |
30 |
0.02 |
0.01 |
0.02 |
| exp2 |
inverted |
neutral |
high |
30 |
0.05 |
0.04 |
0.06 |
| exp2 |
inverted |
neutral |
low |
30 |
0.02 |
0.01 |
0.03 |
| exp2 |
inverted |
irregular |
high |
30 |
0.01 |
0.00 |
0.01 |
| exp2 |
inverted |
irregular |
low |
30 |
0.00 |
0.00 |
0.01 |
EmoSSR.data <- EmoSSR.data %>%
unite("cond4plot", c(orientation, regularity), sep = " ", remove = FALSE) %>%
mutate(cond4plot = factor(cond4plot,
levels = c(
"upright angry", "upright neutral", "upright irregular",
"inverted angry", "inverted neutral", "inverted irregular"
)
))
# pilot1 does not have the column "variability", which messes up all the other plots...
# that's why they are created separately instead of calling facet_wrap(~ experiment, scales = "free")
# pilot1
EmoSSR.plot.pilot1 <-
EmoSSR.data %>%
filter(experiment == "pilot1") %>%
ggplot(aes(
x = cond4plot,
y = CS,
color = cond4plot,
fill = cond4plot
)) +
geom_pirate(
bars = FALSE,
cis = TRUE,
lines = TRUE, lines_params = list(color = "black"),
points = TRUE, points_params = list(shape = 16, color = "black", size = 5, alpha = .2),
violins = TRUE, violins_params = list(size = 1),
show.legend = FALSE
) +
scale_y_continuous(
limits = c(-.1, 1),
breaks = seq(0, 1, .1)
) +
coord_cartesian(ylim = c(-.06, .4)) +
geom_hline(
yintercept = seq(0, 1, .1),
linetype = "dotted",
colour = "#999999",
size = .8,
alpha = .5
) +
labs(
x = "",
y = "CS"
) +
ggtitle("pilot 1") +
theme_EmoSSR
# pilot2
EmoSSR.plot.pilot2 <-
EmoSSR.data %>%
filter(experiment == "pilot2") %>%
ggplot(aes(
x = cond4plot,
y = CS,
color = variability,
fill = variability
)) +
geom_pirate(
bars = FALSE,
cis = TRUE,
lines = TRUE, lines_params = list(color = "black"),
points = TRUE, points_params = list(shape = 16, size = 5, alpha = .2),
violins = TRUE, violins_params = list(size = 1),
show.legend = TRUE
) +
scale_fill_viridis_d(option = "cividis") +
scale_color_viridis_d(option = "cividis") +
scale_y_continuous(
limits = c(-.1, 1),
breaks = seq(0, 1, .1)
) +
coord_cartesian(ylim = c(-.06, .4)) +
geom_hline(
yintercept = seq(0, 1, .1),
linetype = "dotted",
colour = "#999999",
size = .8,
alpha = .5
) +
labs(
x = "",
y = "CS"
) +
ggtitle("pilot 2") +
theme_EmoSSR +
theme(legend.position = c(.8, .8))
# exp1
EmoSSR.plot.exp1 <-
EmoSSR.data %>%
filter(experiment == "exp1") %>%
ggplot(aes(
x = cond4plot,
y = CS,
color = variability,
fill = variability
)) +
geom_pirate(
bars = FALSE,
cis = TRUE,
lines = TRUE, lines_params = list(color = "black"),
points = TRUE, points_params = list(shape = 16, size = 5, alpha = .2),
violins = TRUE, violins_params = list(size = 1),
show.legend = TRUE
) +
scale_fill_viridis_d(option = "cividis") +
scale_color_viridis_d(option = "cividis") +
scale_y_continuous(
limits = c(-.1, 1),
breaks = seq(0, 1, .1)
) +
coord_cartesian(ylim = c(-.06, .4)) +
geom_hline(
yintercept = seq(0, 1, .1),
linetype = "dotted",
colour = "#999999",
size = .8,
alpha = .5
) +
labs(
x = "",
y = "CS"
) +
ggtitle("experiment 1") +
theme_EmoSSR +
theme(legend.position = c(.8, .8))
# exp2
EmoSSR.plot.exp2 <-
EmoSSR.data %>%
filter(experiment == "exp2") %>%
ggplot(aes(
x = cond4plot,
y = CS,
color = variability,
fill = variability
)) +
geom_pirate(
bars = FALSE,
cis = TRUE,
lines = TRUE, lines_params = list(color = "black"),
points = TRUE, points_params = list(shape = 16, size = 5, alpha = .2),
violins = TRUE, violins_params = list(size = 1),
show.legend = TRUE
) +
scale_fill_viridis_d(option = "cividis") +
scale_color_viridis_d(option = "cividis") +
scale_y_continuous(
limits = c(-.1, 1),
breaks = seq(0, 1, .1)
) +
coord_cartesian(ylim = c(-.06, .4)) +
geom_hline(
yintercept = seq(0, 1, .1),
linetype = "dotted",
colour = "#999999",
size = .8,
alpha = .5
) +
labs(
x = "",
y = "CS"
) +
ggtitle("experiment 2") +
theme_EmoSSR +
theme(legend.position = c(.8, .8))
plot_grid(EmoSSR.plot.pilot1, EmoSSR.plot.pilot2, EmoSSR.plot.exp1, EmoSSR.plot.exp2)

# ### save plots to file
# # pilot1
# file.EmoSSR.plot.pilot1 <- EmoSSR.plot.pilot1 +
# coord_cartesian(ylim = c(-.06, .12))
#
# save_plot(paste0(getwd(), "/pilot1_regularFreq.svg"),
# file.EmoSSR.plot.pilot1,
# base_aspect_ratio = 1,
# base_width = 11
# )
#
# # pilot2
# save_plot(paste0(getwd(), "/pilot2_regularFreq.svg"),
# EmoSSR.plot.pilot2,
# base_aspect_ratio = 1,
# base_width = 11
# )
#
# # exp1
# file.EmoSSR.plot.exp1 <- EmoSSR.plot.exp1 +
# coord_cartesian(ylim = c(-.06, .23))
#
# save_plot(paste0(getwd(), "/exp1_regularFreq.svg"),
# file.EmoSSR.plot.exp1,
# base_aspect_ratio = 1,
# base_width = 11
# )
#
# # exp2
# file.EmoSSR.plot.exp2 <- EmoSSR.plot.exp2 +
# coord_cartesian(ylim = c(-.06, .2))
#
# save_plot(paste0(getwd(), "/exp2_regularFreq.svg"),
# file.EmoSSR.plot.exp2,
# base_aspect_ratio = 1,
# base_width = 11
# )
For the statistical analyses, we fit Bayesian multilevel models using brms. The constant effect was condition. Intercepts and slopes were allowed to vary as a function of participant.
Pilot 1
- flickering frequency: 15 Hz
- regularity: 5 Hz
- 9 face identities
- task: detect dots on faces
# subset data
EmoSSR.pilot1 <- EmoSSR.data %>%
filter(experiment == "pilot1") %>%
dplyr::select(-variability) %>%
droplevels() %>%
mutate(condition = as.factor(gsub("_NA", "", condition)))
pilot1.model <- brm(CS ~ 0 + condition # constant effects
+ (0 + condition | participant), # varying effects
data = EmoSSR.pilot1, # subset data current experiment
family = gaussian(), # likelihood function
prior = weak.priors, # priors
sample_prior = TRUE, # draw samples from the prior distribution
inits = "random", # initial parameter values in the chains
control = list(
adapt_delta = .99, # parameters of NUTS sampler
max_treedepth = 15
),
chains = num.chains, # number of chains
iter = num.iter, # number of iterations
warmup = num.warmup, # number of warm-up samples
thin = num.thin, # thinning rate
algorithm = "sampling", # type of sampling algorithm
cores = num.chains, # number of processor cores to use when running chains in parallel
seed = seed.smorfia # RNG seed
)
saveRDS(pilot1.model, file = "pilot1_model.rds", compress = "gzip") # save results
# subset data
EmoSSR.pilot1 <- EmoSSR.data %>%
filter(experiment == "pilot1") %>%
dplyr::select(-variability) %>%
droplevels() %>%
mutate(condition = as.factor(gsub("_NA", "", condition)))
# load model
pilot1.model <- readRDS("pilot1_model.rds")
# summary posterior distributions & diagnostics
summary.pilot1.model <-
describe_posterior(pilot1.model,
centrality = "mean",
ci = 0.95,
ci_method = "hdi",
test = NULL,
diagnostic = "all"
) %>%
mutate(
Parameter = gsub("b_condition", "", Parameter),
Parameter2 = gsub("_", " ", Parameter),
condition = factor(Parameter2,
levels =
c(
"upright angry", "upright neutral", "upright irregular",
"inverted angry", "inverted neutral", "inverted irregular"
)
)
) %>%
dplyr::select(Parameter, Mean, HDI95_Low = CI_low, HDI95_High = CI_high, Estimated_Sample_Size = ESS, MonteCarlo_StdErr = MCSE)
kable(summary.pilot1.model, digits = 2)
| inverted_angry |
0.03 |
0.01 |
0.05 |
5713 |
0 |
| inverted_irregular |
0.00 |
0.00 |
0.00 |
14452 |
0 |
| inverted_neutral |
0.05 |
0.04 |
0.06 |
12170 |
0 |
| upright_angry |
0.03 |
0.01 |
0.04 |
13492 |
0 |
| upright_irregular |
0.00 |
0.00 |
0.01 |
14595 |
0 |
| upright_neutral |
0.05 |
0.04 |
0.07 |
13834 |
0 |
# MCMC chains
pilot1.model %>%
spread_draws(`b_.*`, regex = TRUE) %>%
dplyr::select(
"Chain" = ".chain",
"upright angry" = "b_conditionupright_angry",
"upright neutral" = "b_conditionupright_neutral",
"upright irregular" = "b_conditionupright_irregular",
"inverted angry" = "b_conditioninverted_angry",
"inverted neutral" = "b_conditioninverted_neutral",
"inverted irregular" = "b_conditioninverted_irregular"
) %>%
as.data.frame() %>%
mcmc_trace(facet_args = list(ncol = 3)) +
geom_vline(
xintercept = seq(0, 2000, 500),
linetype = "dotted",
colour = "#999999",
size = .8,
alpha = .5
) +
ggtitle("chain convergence") +
theme_EmoSSR +
theme(legend.position = "none")


pilot1.posterior.test <- pilot1.model %>%
spread_draws(`b_.*`, regex = TRUE) %>%
dplyr::select(
"upright angry" = "b_conditionupright_angry",
"upright neutral" = "b_conditionupright_neutral",
"upright irregular" = "b_conditionupright_irregular",
"inverted angry" = "b_conditioninverted_angry",
"inverted neutral" = "b_conditioninverted_neutral",
"inverted irregular" = "b_conditioninverted_irregular"
) %>%
mutate(
### orientation
# angry
diff.angry.uprightVSinverted = `upright angry` - `inverted angry`,
# neutral
diff.neutral.uprightVSinverted = `upright neutral` - `inverted neutral`,
# irregular
diff.irregular.uprightVSinverted = `upright irregular` - `inverted irregular`,
### regularity
## upright
# angry minus neutral
diff.upright.angryVSneutral = `upright angry` - `upright neutral`,
# angry minus irregular
diff.upright.angryVSirregular = `upright angry` - `upright irregular`,
# neutral minus irregular
diff.upright.neutralVSirregular = `upright neutral` - `upright irregular`,
## inverted
# angry minus neutral
diff.inverted.angryVSneutral = `inverted angry` - `inverted neutral`,
# angry minus irregular
diff.inverted.angryVSirregular = `inverted angry` - `inverted irregular`,
# neutral minus irregular
diff.inverted.neutralVSirregular = `inverted neutral` - `inverted irregular`
) %>%
gather(key = "condition", value = "CS") %>%
mutate(condition = factor(condition,
levels = c(
"upright angry", "upright neutral", "upright irregular",
"inverted angry", "inverted neutral", "inverted irregular",
"diff.angry.uprightVSinverted",
"diff.neutral.uprightVSinverted",
"diff.irregular.uprightVSinverted",
"diff.upright.angryVSneutral",
"diff.upright.angryVSirregular",
"diff.upright.neutralVSirregular",
"diff.inverted.angryVSneutral",
"diff.inverted.angryVSirregular",
"diff.inverted.neutralVSirregular"
)
))
# summary
summary.pilot1.posterior.test <- pilot1.posterior.test %>%
group_by(condition) %>%
dplyr::summarize(
mean = mean(CS),
hdi.95.low = hdi(CS)[1],
hdi.95.high = hdi(CS)[2],
evidence.ratio = ifelse(mean < 0,
length(which(CS < 0)) / length(which(CS > 0)),
length(which(CS > 0)) / length(which(CS < 0))
)
) %>%
ungroup()
kable(summary.pilot1.posterior.test, digits = 2)
| upright angry |
0.03 |
0.01 |
0.04 |
665.67 |
| upright neutral |
0.05 |
0.04 |
0.07 |
Inf |
| upright irregular |
0.00 |
0.00 |
0.01 |
319.00 |
| inverted angry |
0.03 |
0.01 |
0.05 |
1599.00 |
| inverted neutral |
0.05 |
0.04 |
0.06 |
Inf |
| inverted irregular |
0.00 |
0.00 |
0.00 |
1.35 |
| diff.angry.uprightVSinverted |
0.00 |
-0.02 |
0.02 |
1.38 |
| diff.neutral.uprightVSinverted |
0.01 |
-0.01 |
0.02 |
3.39 |
| diff.irregular.uprightVSinverted |
0.00 |
0.00 |
0.01 |
26.49 |
| diff.upright.angryVSneutral |
-0.03 |
-0.05 |
-0.01 |
162.27 |
| diff.upright.angryVSirregular |
0.02 |
0.01 |
0.04 |
234.29 |
| diff.upright.neutralVSirregular |
0.05 |
0.04 |
0.06 |
Inf |
| diff.inverted.angryVSneutral |
-0.02 |
-0.04 |
0.00 |
25.02 |
| diff.inverted.angryVSirregular |
0.03 |
0.01 |
0.04 |
1141.86 |
| diff.inverted.neutralVSirregular |
0.05 |
0.03 |
0.06 |
Inf |
### CSs higher than noise? ###
pilot1.posterior.test.VS.0 <- filter(
pilot1.posterior.test,
condition == c(
"upright angry", "upright neutral", "upright irregular",
"inverted angry", "inverted neutral", "inverted irregular"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(pilot1.posterior.test.VS.0$condition))) {
temp.data <- filter(pilot1.posterior.test.VS.0, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

### Paired comparisons ###
pilot1.posterior.test.paired <- filter(
pilot1.posterior.test,
condition == c(
"diff.angry.uprightVSinverted",
"diff.neutral.uprightVSinverted",
"diff.irregular.uprightVSinverted",
"diff.upright.angryVSneutral",
"diff.upright.angryVSirregular",
"diff.upright.neutralVSirregular",
"diff.inverted.angryVSneutral",
"diff.inverted.angryVSirregular",
"diff.inverted.neutralVSirregular"
)
) %>%
droplevels()
par(mfrow = c(3, 3))
for (i in 1:length(levels(pilot1.posterior.test.paired$condition))) {
temp.data <- filter(pilot1.posterior.test.paired, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

Take-home messages:
- comparison with 0
- regular angry and neutral faces elicit SSR reliably larger than noise, in both orientations
- irregular faces elicit SSR reliably larger than noise only when upright
- paired comparisons:
- orientation
- regular angry and neutral faces elicit similar SSR when upright or inverted
- irregular faces elicit larger SSR when upright compared to inverted
- regularity
- regular angry and neutral faces elicit larger SSR compared to irregular faces, in both orientations
- regular angry faces elicit lower SSR compared to regular neutral faces, in both orientations
Pilot 2
- flickering frequency: 15 Hz
- regularity: 5 Hz
- 2 face identities
- task: detect dots on faces
# subset data
EmoSSR.pilot2 <- EmoSSR.data %>%
filter(experiment == "pilot2")
pilot2.model <- brm(CS ~ 0 + condition # constant effects
+ (0 + condition | participant), # varying effects
data = EmoSSR.pilot2, # subset data current experiment
family = gaussian(), # likelihood function
prior = weak.priors, # priors
sample_prior = TRUE, # draw samples from the prior distribution
inits = "random", # initial parameter values in the chains
control = list(
adapt_delta = .99, # parameters of NUTS sampler
max_treedepth = 15
),
chains = num.chains, # number of chains
iter = num.iter, # number of iterations
warmup = num.warmup, # number of warm-up samples
thin = num.thin, # thinning rate
algorithm = "sampling", # type of sampling algorithm
cores = num.chains, # number of processor cores to use when running chains in parallel
seed = seed.smorfia # RNG seed
)
saveRDS(pilot2.model, file = "pilot2_model.rds", compress = "gzip") # save results
# subset data
EmoSSR.pilot2 <- EmoSSR.data %>%
filter(experiment == "pilot2")
# load model
pilot2.model <- readRDS("pilot2_model.rds")
# summary posterior distributions & diagnostics
summary.pilot2.model <-
describe_posterior(pilot2.model,
centrality = "mean",
ci = 0.95,
ci_method = "hdi",
test = NULL,
diagnostic = "all"
) %>%
mutate(
Parameter = gsub("b_condition", "", Parameter),
Parameter2 = gsub("_", " ", Parameter),
condition = factor(Parameter2,
levels =
c(
"upright angry high", "upright neutral high", "upright irregular high",
"upright angry low", "upright neutral low", "upright irregular low",
"inverted angry high", "inverted neutral high", "inverted irregular high",
"inverted angry low", "inverted neutral low", "inverted irregular low"
)
)
) %>%
dplyr::select(Parameter, Mean, HDI95_Low = CI_low, HDI95_High = CI_high, Estimated_Sample_Size = ESS, MonteCarlo_StdErr = MCSE)
kable(summary.pilot2.model, digits = 2)
| inverted_angry_high |
0.05 |
0.03 |
0.07 |
8437 |
0 |
| inverted_angry_low |
0.05 |
0.03 |
0.07 |
8538 |
0 |
| inverted_irregular_high |
0.01 |
0.00 |
0.02 |
12441 |
0 |
| inverted_irregular_high |
0.01 |
0.00 |
0.02 |
12441 |
0 |
| inverted_irregular_low |
-0.01 |
-0.01 |
0.00 |
13497 |
0 |
| inverted_irregular_low |
-0.01 |
-0.01 |
0.00 |
13497 |
0 |
| inverted_neutral_high |
0.11 |
0.07 |
0.14 |
10957 |
0 |
| inverted_neutral_low |
0.05 |
0.02 |
0.08 |
12095 |
0 |
| upright_angry_high |
0.08 |
0.04 |
0.12 |
11431 |
0 |
| upright_angry_low |
0.04 |
0.02 |
0.07 |
12154 |
0 |
| upright_irregular_high |
0.00 |
-0.01 |
0.00 |
12872 |
0 |
| upright_irregular_high |
0.00 |
-0.01 |
0.00 |
12872 |
0 |
| upright_irregular_low |
0.00 |
-0.01 |
0.01 |
14103 |
0 |
| upright_irregular_low |
0.00 |
-0.01 |
0.01 |
14103 |
0 |
| upright_neutral_high |
0.11 |
0.07 |
0.15 |
12653 |
0 |
| upright_neutral_low |
0.06 |
0.04 |
0.08 |
12522 |
0 |
# MCMC chains
pilot2.model %>%
spread_draws(`b_.*`, regex = TRUE) %>%
dplyr::select(
"Chain" = ".chain",
"upright angry high" = "b_conditionupright_angry_high",
"upright neutral high" = "b_conditionupright_neutral_high",
"upright irregular high" = "b_conditionupright_irregular_high",
"upright angry low" = "b_conditionupright_angry_low",
"upright neutral low" = "b_conditionupright_neutral_low",
"upright irregular low" = "b_conditionupright_irregular_low",
"inverted angry high" = "b_conditioninverted_angry_high",
"inverted neutral high" = "b_conditioninverted_neutral_high",
"inverted irregular high" = "b_conditioninverted_irregular_high",
"inverted angry low" = "b_conditioninverted_angry_low",
"inverted neutral low" = "b_conditioninverted_neutral_low",
"inverted irregular low" = "b_conditioninverted_irregular_low"
) %>%
as.data.frame() %>%
mcmc_trace(facet_args = list(ncol = 3)) +
geom_vline(
xintercept = seq(0, 2000, 500),
linetype = "dotted",
colour = "#999999",
size = .8,
alpha = .5
) +
ggtitle("chain convergence") +
theme_EmoSSR +
theme(legend.position = "none")


pilot2.posterior.test <- pilot2.model %>%
spread_draws(`b_.*`, regex = TRUE) %>%
dplyr::select(
"upright angry high" = "b_conditionupright_angry_high",
"upright neutral high" = "b_conditionupright_neutral_high",
"upright irregular high" = "b_conditionupright_irregular_high",
"upright angry low" = "b_conditionupright_angry_low",
"upright neutral low" = "b_conditionupright_neutral_low",
"upright irregular low" = "b_conditionupright_irregular_low",
"inverted angry high" = "b_conditioninverted_angry_high",
"inverted neutral high" = "b_conditioninverted_neutral_high",
"inverted irregular high" = "b_conditioninverted_irregular_high",
"inverted angry low" = "b_conditioninverted_angry_low",
"inverted neutral low" = "b_conditioninverted_neutral_low",
"inverted irregular low" = "b_conditioninverted_irregular_low"
) %>%
mutate(
### orientation
# angry high
diff.high.angry.uprightVSinverted = `upright angry high` - `inverted angry high`,
# neutral high
diff.high.neutral.uprightVSinverted = `upright neutral high` - `inverted neutral high`,
# irregular high
diff.high.irregular.uprightVSinverted = `upright irregular high` - `inverted irregular high`,
# angry low
diff.low.angry.uprightVSinverted = `upright angry low` - `inverted angry low`,
# neutral high
diff.low.neutral.uprightVSinverted = `upright neutral low` - `inverted neutral low`,
# irregular high
diff.low.irregular.uprightVSinverted = `upright irregular low` - `inverted irregular low`,
### regularity
## upright high
# angry minus neutral
diff.high.upright.angryVSneutral = `upright angry high` - `upright neutral high`,
# angry minus irregular
diff.high.upright.angryVSirregular = `upright angry high` - `upright irregular high`,
# neutral minus irregular
diff.high.upright.neutralVSirregular = `upright neutral high` - `upright irregular high`,
## upright low
# angry minus neutral
diff.low.upright.angryVSneutral = `upright angry low` - `upright neutral low`,
# angry minus irregular
diff.low.upright.angryVSirregular = `upright angry low` - `upright irregular low`,
# neutral minus irregular
diff.low.upright.neutralVSirregular = `upright neutral low` - `upright irregular low`,
## inverted high
# angry minus neutral
diff.high.inverted.angryVSneutral = `inverted angry high` - `inverted neutral high`,
# angry minus irregular
diff.high.inverted.angryVSirregular = `inverted angry high` - `inverted irregular high`,
# neutral minus irregular
diff.high.inverted.neutralVSirregular = `inverted neutral high` - `inverted irregular high`,
## inverted low
# angry minus neutral
diff.low.inverted.angryVSneutral = `inverted angry low` - `inverted neutral low`,
# angry minus irregular
diff.low.inverted.angryVSirregular = `inverted angry low` - `inverted irregular low`,
# neutral minus irregular
diff.low.inverted.neutralVSirregular = `inverted neutral low` - `inverted irregular low`,
### variability
## upright angry
diff.upright.angry.highVSlow = `upright angry high` - `upright angry low`,
## upright neutral
diff.upright.neutral.highVSlow = `upright neutral high` - `upright neutral low`,
## upright irregular
diff.upright.irregular.highVSlow = `upright irregular high` - `upright irregular low`,
## inverted angry
diff.inverted.angry.highVSlow = `inverted angry high` - `inverted angry low`,
## inverted neutral
diff.inverted.neutral.highVSlow = `inverted neutral high` - `inverted neutral low`,
## inverted irregular
diff.inverted.irregular.highVSlow = `inverted irregular high` - `inverted irregular low`
) %>%
gather(key = "condition", value = "CS") %>%
mutate(condition = factor(condition,
levels = c(
"upright angry high", "upright neutral high", "upright irregular high",
"upright angry low", "upright neutral low", "upright irregular low",
"inverted angry high", "inverted neutral high", "inverted irregular high",
"inverted angry low", "inverted neutral low", "inverted irregular low",
"diff.high.angry.uprightVSinverted",
"diff.high.neutral.uprightVSinverted",
"diff.high.irregular.uprightVSinverted",
"diff.low.angry.uprightVSinverted",
"diff.low.neutral.uprightVSinverted",
"diff.low.irregular.uprightVSinverted",
"diff.high.upright.angryVSneutral",
"diff.high.upright.angryVSirregular",
"diff.high.upright.neutralVSirregular",
"diff.low.upright.angryVSneutral",
"diff.low.upright.angryVSirregular",
"diff.low.upright.neutralVSirregular",
"diff.high.inverted.angryVSneutral",
"diff.high.inverted.angryVSirregular",
"diff.high.inverted.neutralVSirregular",
"diff.low.inverted.angryVSneutral",
"diff.low.inverted.angryVSirregular",
"diff.low.inverted.neutralVSirregular",
"diff.upright.angry.highVSlow",
"diff.upright.neutral.highVSlow",
"diff.upright.irregular.highVSlow",
"diff.inverted.angry.highVSlow",
"diff.inverted.neutral.highVSlow",
"diff.inverted.irregular.highVSlow"
)
))
# summary
summary.pilot2.posterior.test <- pilot2.posterior.test %>%
group_by(condition) %>%
dplyr::summarize(
mean = mean(CS),
hdi.95.low = hdi(CS)[1],
hdi.95.high = hdi(CS)[2],
evidence.ratio = ifelse(mean < 0,
length(which(CS < 0)) / length(which(CS > 0)),
length(which(CS > 0)) / length(which(CS < 0))
)
) %>%
ungroup()
kable(summary.pilot2.posterior.test, digits = 2)
| upright angry high |
0.08 |
0.04 |
0.12 |
1453.55 |
| upright neutral high |
0.11 |
0.07 |
0.15 |
Inf |
| upright irregular high |
0.00 |
-0.01 |
0.00 |
4.04 |
| upright angry low |
0.04 |
0.02 |
0.07 |
1776.78 |
| upright neutral low |
0.06 |
0.04 |
0.08 |
Inf |
| upright irregular low |
0.00 |
-0.01 |
0.01 |
1.21 |
| inverted angry high |
0.05 |
0.03 |
0.07 |
Inf |
| inverted neutral high |
0.11 |
0.07 |
0.14 |
Inf |
| inverted irregular high |
0.01 |
0.00 |
0.02 |
20.86 |
| inverted angry low |
0.05 |
0.03 |
0.07 |
3999.00 |
| inverted neutral low |
0.05 |
0.02 |
0.08 |
1141.86 |
| inverted irregular low |
-0.01 |
-0.01 |
0.00 |
12.79 |
| diff.high.angry.uprightVSinverted |
0.03 |
-0.02 |
0.07 |
8.91 |
| diff.high.neutral.uprightVSinverted |
0.00 |
-0.06 |
0.06 |
1.03 |
| diff.high.irregular.uprightVSinverted |
-0.01 |
-0.03 |
0.00 |
39.00 |
| diff.low.angry.uprightVSinverted |
-0.01 |
-0.04 |
0.02 |
2.54 |
| diff.low.neutral.uprightVSinverted |
0.01 |
-0.01 |
0.04 |
4.52 |
| diff.low.irregular.uprightVSinverted |
0.00 |
-0.01 |
0.02 |
3.86 |
| diff.high.upright.angryVSneutral |
-0.03 |
-0.08 |
0.02 |
9.09 |
| diff.high.upright.angryVSirregular |
0.08 |
0.04 |
0.12 |
1776.78 |
| diff.high.upright.neutralVSirregular |
0.11 |
0.07 |
0.15 |
Inf |
| diff.low.upright.angryVSneutral |
-0.02 |
-0.04 |
0.01 |
8.19 |
| diff.low.upright.angryVSirregular |
0.04 |
0.02 |
0.07 |
1999.00 |
| diff.low.upright.neutralVSirregular |
0.06 |
0.04 |
0.08 |
Inf |
| diff.high.inverted.angryVSneutral |
-0.06 |
-0.09 |
-0.02 |
614.38 |
| diff.high.inverted.angryVSirregular |
0.04 |
0.02 |
0.06 |
1332.33 |
| diff.high.inverted.neutralVSirregular |
0.10 |
0.06 |
0.13 |
Inf |
| diff.low.inverted.angryVSneutral |
0.00 |
-0.03 |
0.04 |
1.29 |
| diff.low.inverted.angryVSirregular |
0.06 |
0.03 |
0.08 |
15999.00 |
| diff.low.inverted.neutralVSirregular |
0.05 |
0.03 |
0.08 |
1776.78 |
| diff.upright.angry.highVSlow |
0.04 |
-0.01 |
0.08 |
12.69 |
| diff.upright.neutral.highVSlow |
0.05 |
0.01 |
0.09 |
90.95 |
| diff.upright.irregular.highVSlow |
0.00 |
-0.01 |
0.01 |
2.10 |
| diff.inverted.angry.highVSlow |
0.00 |
-0.03 |
0.03 |
1.09 |
| diff.inverted.neutral.highVSlow |
0.06 |
0.02 |
0.10 |
409.26 |
| diff.inverted.irregular.highVSlow |
0.02 |
0.00 |
0.03 |
49.00 |
### CSs higher than noise? ###
pilot2.posterior.test.VS.0 <- filter(
pilot2.posterior.test,
condition == c(
"upright angry high", "upright neutral high", "upright irregular high",
"upright angry low", "upright neutral low", "upright irregular low",
"inverted angry high", "inverted neutral high", "inverted irregular high",
"inverted angry low", "inverted neutral low", "inverted irregular low"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(pilot2.posterior.test.VS.0$condition))) {
temp.data <- filter(pilot2.posterior.test.VS.0, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}


### Paired comparisons ###
### orientation
pilot2.posterior.test.orientation <- filter(
pilot2.posterior.test,
condition == c(
"diff.high.angry.uprightVSinverted",
"diff.high.neutral.uprightVSinverted",
"diff.high.irregular.uprightVSinverted",
"diff.low.angry.uprightVSinverted",
"diff.low.neutral.uprightVSinverted",
"diff.low.irregular.uprightVSinverted"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(pilot2.posterior.test.orientation$condition))) {
temp.data <- filter(pilot2.posterior.test.orientation, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

### regularity
pilot2.posterior.test.regularity <- filter(
pilot2.posterior.test,
condition == c(
"diff.high.upright.angryVSneutral",
"diff.high.upright.angryVSirregular",
"diff.high.upright.neutralVSirregular",
"diff.low.upright.angryVSneutral",
"diff.low.upright.angryVSirregular",
"diff.low.upright.neutralVSirregular",
"diff.high.inverted.angryVSneutral",
"diff.high.inverted.angryVSirregular",
"diff.high.inverted.neutralVSirregular",
"diff.low.inverted.angryVSneutral",
"diff.low.inverted.angryVSirregular",
"diff.low.inverted.neutralVSirregular"
)
) %>%
droplevels()
par(mfrow = c(4, 3))
for (i in 1:length(levels(pilot2.posterior.test.regularity$condition))) {
temp.data <- filter(pilot2.posterior.test.regularity, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

### variability
pilot2.posterior.test.variability <- filter(
pilot2.posterior.test,
condition == c(
"diff.upright.angry.highVSlow",
"diff.upright.neutral.highVSlow",
"diff.upright.irregular.highVSlow",
"diff.inverted.angry.highVSlow",
"diff.inverted.neutral.highVSlow",
"diff.inverted.irregular.highVSlow"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(pilot2.posterior.test.variability$condition))) {
temp.data <- filter(pilot2.posterior.test.variability, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

Take-home messages:
- comparison with 0
- upright angry and neutral faces elicit SSR larger than noise, in all orientations and within-identity emotion variabilities
- upright irregular faces elicit SSR not distinguishable from noise, in both within-identity emotion variabilities
- inverted irregular faces elicit SSR slightly larger than noise only when within-identity emotion variability is high
- paired comparisons:
- orientation
- upright and inverted faces elicit similar SSR in all regularities and within-identity emotion variabilities
- only exception: irregular faces elicit slightly larger SSR when inverted compared to upright only when within-identity emotion variability is high
- regularity
- angry and neutral faces elicit larger SSR than irregular faces, in all orientations and within-identity emotion variabilities
- neutral faces elicit larger SSR than angry faces only when inverted and within-identity emotion variability is high
- within-identity emotion variability
- angry faces elicit similar SSR in high and low variability, in both orientations
- neutral faces elicit larger SSR when variability is high, in both orientations
- irregular faces elicit larger SSR when variability is high, only when inverted
Exp 1
- flickering frequency: 6 Hz
- regularity: 2 Hz
- 2 face identities
- task: detect dots on faces
# subset data
EmoSSR.exp1 <- EmoSSR.data %>%
filter(experiment == "exp1")
exp1.model <- brm(CS ~ 0 + condition # constant effects
+ (0 + condition | participant), # varying effects
data = EmoSSR.exp1, # subset data current experiment
family = gaussian(), # likelihood function
prior = weak.priors, # priors
sample_prior = TRUE, # draw samples from the prior distribution
inits = "random", # initial parameter values in the chains
control = list(
adapt_delta = .99, # parameters of NUTS sampler
max_treedepth = 15
),
chains = num.chains, # number of chains
iter = num.iter, # number of iterations
warmup = num.warmup, # number of warm-up samples
thin = num.thin, # thinning rate
algorithm = "sampling", # type of sampling algorithm
cores = num.chains, # number of processor cores to use when running chains in parallel
seed = seed.smorfia # RNG seed
)
saveRDS(exp1.model, file = "exp1_model.rds", compress = "gzip") # save results
# subset data
EmoSSR.exp1 <- EmoSSR.data %>%
filter(experiment == "exp1")
# load model
exp1.model <- readRDS("exp1_model.rds")
# summary posterior distributions & diagnostics
summary.exp1.model <-
describe_posterior(exp1.model,
centrality = "mean",
ci = 0.95,
ci_method = "hdi",
test = NULL,
diagnostic = "all"
) %>%
mutate(
Parameter = gsub("b_condition", "", Parameter),
Parameter2 = gsub("_", " ", Parameter),
condition = factor(Parameter2,
levels =
c(
"upright angry high", "upright neutral high", "upright irregular high",
"upright angry low", "upright neutral low", "upright irregular low",
"inverted angry high", "inverted neutral high", "inverted irregular high",
"inverted angry low", "inverted neutral low", "inverted irregular low"
)
)
) %>%
dplyr::select(Parameter, Mean, HDI95_Low = CI_low, HDI95_High = CI_high, Estimated_Sample_Size = ESS, MonteCarlo_StdErr = MCSE)
kable(summary.exp1.model, digits = 2)
| inverted_angry_high |
0.02 |
0.01 |
0.03 |
9620 |
0 |
| inverted_angry_low |
0.01 |
0.00 |
0.02 |
13004 |
0 |
| inverted_irregular_high |
0.00 |
-0.01 |
0.00 |
11684 |
0 |
| inverted_irregular_high |
0.00 |
-0.01 |
0.00 |
11684 |
0 |
| inverted_irregular_low |
0.00 |
-0.01 |
0.00 |
12484 |
0 |
| inverted_irregular_low |
0.00 |
-0.01 |
0.00 |
12484 |
0 |
| inverted_neutral_high |
0.04 |
0.02 |
0.05 |
10695 |
0 |
| inverted_neutral_low |
0.02 |
0.01 |
0.03 |
11560 |
0 |
| upright_angry_high |
0.03 |
0.02 |
0.04 |
13275 |
0 |
| upright_angry_low |
0.02 |
0.01 |
0.03 |
13111 |
0 |
| upright_irregular_high |
0.00 |
-0.01 |
0.01 |
13757 |
0 |
| upright_irregular_high |
0.00 |
-0.01 |
0.01 |
13757 |
0 |
| upright_irregular_low |
0.00 |
-0.01 |
0.01 |
13403 |
0 |
| upright_irregular_low |
0.00 |
-0.01 |
0.01 |
13403 |
0 |
| upright_neutral_high |
0.05 |
0.03 |
0.07 |
12948 |
0 |
| upright_neutral_low |
0.03 |
0.01 |
0.04 |
12477 |
0 |
# MCMC chains
exp1.model %>%
spread_draws(`b_.*`, regex = TRUE) %>%
dplyr::select(
"Chain" = ".chain",
"upright angry high" = "b_conditionupright_angry_high",
"upright neutral high" = "b_conditionupright_neutral_high",
"upright irregular high" = "b_conditionupright_irregular_high",
"upright angry low" = "b_conditionupright_angry_low",
"upright neutral low" = "b_conditionupright_neutral_low",
"upright irregular low" = "b_conditionupright_irregular_low",
"inverted angry high" = "b_conditioninverted_angry_high",
"inverted neutral high" = "b_conditioninverted_neutral_high",
"inverted irregular high" = "b_conditioninverted_irregular_high",
"inverted angry low" = "b_conditioninverted_angry_low",
"inverted neutral low" = "b_conditioninverted_neutral_low",
"inverted irregular low" = "b_conditioninverted_irregular_low"
) %>%
as.data.frame() %>%
mcmc_trace(facet_args = list(ncol = 3)) +
geom_vline(
xintercept = seq(0, 2000, 500),
linetype = "dotted",
colour = "#999999",
size = .8,
alpha = .5
) +
ggtitle("chain convergence") +
theme_EmoSSR +
theme(legend.position = "none")


exp1.posterior.test <- exp1.model %>%
spread_draws(`b_.*`, regex = TRUE) %>%
dplyr::select(
"upright angry high" = "b_conditionupright_angry_high",
"upright neutral high" = "b_conditionupright_neutral_high",
"upright irregular high" = "b_conditionupright_irregular_high",
"upright angry low" = "b_conditionupright_angry_low",
"upright neutral low" = "b_conditionupright_neutral_low",
"upright irregular low" = "b_conditionupright_irregular_low",
"inverted angry high" = "b_conditioninverted_angry_high",
"inverted neutral high" = "b_conditioninverted_neutral_high",
"inverted irregular high" = "b_conditioninverted_irregular_high",
"inverted angry low" = "b_conditioninverted_angry_low",
"inverted neutral low" = "b_conditioninverted_neutral_low",
"inverted irregular low" = "b_conditioninverted_irregular_low"
) %>%
mutate(
### orientation
# angry high
diff.high.angry.uprightVSinverted = `upright angry high` - `inverted angry high`,
# neutral high
diff.high.neutral.uprightVSinverted = `upright neutral high` - `inverted neutral high`,
# irregular high
diff.high.irregular.uprightVSinverted = `upright irregular high` - `inverted irregular high`,
# angry low
diff.low.angry.uprightVSinverted = `upright angry low` - `inverted angry low`,
# neutral high
diff.low.neutral.uprightVSinverted = `upright neutral low` - `inverted neutral low`,
# irregular high
diff.low.irregular.uprightVSinverted = `upright irregular low` - `inverted irregular low`,
### regularity
## upright high
# angry minus neutral
diff.high.upright.angryVSneutral = `upright angry high` - `upright neutral high`,
# angry minus irregular
diff.high.upright.angryVSirregular = `upright angry high` - `upright irregular high`,
# neutral minus irregular
diff.high.upright.neutralVSirregular = `upright neutral high` - `upright irregular high`,
## upright low
# angry minus neutral
diff.low.upright.angryVSneutral = `upright angry low` - `upright neutral low`,
# angry minus irregular
diff.low.upright.angryVSirregular = `upright angry low` - `upright irregular low`,
# neutral minus irregular
diff.low.upright.neutralVSirregular = `upright neutral low` - `upright irregular low`,
## inverted high
# angry minus neutral
diff.high.inverted.angryVSneutral = `inverted angry high` - `inverted neutral high`,
# angry minus irregular
diff.high.inverted.angryVSirregular = `inverted angry high` - `inverted irregular high`,
# neutral minus irregular
diff.high.inverted.neutralVSirregular = `inverted neutral high` - `inverted irregular high`,
## inverted low
# angry minus neutral
diff.low.inverted.angryVSneutral = `inverted angry low` - `inverted neutral low`,
# angry minus irregular
diff.low.inverted.angryVSirregular = `inverted angry low` - `inverted irregular low`,
# neutral minus irregular
diff.low.inverted.neutralVSirregular = `inverted neutral low` - `inverted irregular low`,
### variability
## upright angry
diff.upright.angry.highVSlow = `upright angry high` - `upright angry low`,
## upright neutral
diff.upright.neutral.highVSlow = `upright neutral high` - `upright neutral low`,
## upright irregular
diff.upright.irregular.highVSlow = `upright irregular high` - `upright irregular low`,
## inverted angry
diff.inverted.angry.highVSlow = `inverted angry high` - `inverted angry low`,
## inverted neutral
diff.inverted.neutral.highVSlow = `inverted neutral high` - `inverted neutral low`,
## inverted irregular
diff.inverted.irregular.highVSlow = `inverted irregular high` - `inverted irregular low`
) %>%
gather(key = "condition", value = "CS") %>%
mutate(condition = factor(condition,
levels = c(
"upright angry high", "upright neutral high", "upright irregular high",
"upright angry low", "upright neutral low", "upright irregular low",
"inverted angry high", "inverted neutral high", "inverted irregular high",
"inverted angry low", "inverted neutral low", "inverted irregular low",
"diff.high.angry.uprightVSinverted",
"diff.high.neutral.uprightVSinverted",
"diff.high.irregular.uprightVSinverted",
"diff.low.angry.uprightVSinverted",
"diff.low.neutral.uprightVSinverted",
"diff.low.irregular.uprightVSinverted",
"diff.high.upright.angryVSneutral",
"diff.high.upright.angryVSirregular",
"diff.high.upright.neutralVSirregular",
"diff.low.upright.angryVSneutral",
"diff.low.upright.angryVSirregular",
"diff.low.upright.neutralVSirregular",
"diff.high.inverted.angryVSneutral",
"diff.high.inverted.angryVSirregular",
"diff.high.inverted.neutralVSirregular",
"diff.low.inverted.angryVSneutral",
"diff.low.inverted.angryVSirregular",
"diff.low.inverted.neutralVSirregular",
"diff.upright.angry.highVSlow",
"diff.upright.neutral.highVSlow",
"diff.upright.irregular.highVSlow",
"diff.inverted.angry.highVSlow",
"diff.inverted.neutral.highVSlow",
"diff.inverted.irregular.highVSlow"
)
))
# summary
summary.exp1.posterior.test <- exp1.posterior.test %>%
group_by(condition) %>%
dplyr::summarize(
mean = mean(CS),
hdi.95.low = hdi(CS)[1],
hdi.95.high = hdi(CS)[2],
evidence.ratio = ifelse(mean < 0,
length(which(CS < 0)) / length(which(CS > 0)),
length(which(CS > 0)) / length(which(CS < 0))
)
) %>%
ungroup()
kable(summary.exp1.posterior.test, digits = 2)
| upright angry high |
0.03 |
0.02 |
0.04 |
Inf |
| upright neutral high |
0.05 |
0.03 |
0.07 |
15999.00 |
| upright irregular high |
0.00 |
-0.01 |
0.01 |
1.96 |
| upright angry low |
0.02 |
0.01 |
0.03 |
2665.67 |
| upright neutral low |
0.03 |
0.01 |
0.04 |
3999.00 |
| upright irregular low |
0.00 |
-0.01 |
0.01 |
1.06 |
| inverted angry high |
0.02 |
0.01 |
0.03 |
Inf |
| inverted neutral high |
0.04 |
0.02 |
0.05 |
Inf |
| inverted irregular high |
0.00 |
-0.01 |
0.00 |
10.49 |
| inverted angry low |
0.01 |
0.00 |
0.02 |
799.00 |
| inverted neutral low |
0.02 |
0.01 |
0.03 |
Inf |
| inverted irregular low |
0.00 |
-0.01 |
0.00 |
2.44 |
| diff.high.angry.uprightVSinverted |
0.01 |
0.00 |
0.02 |
17.16 |
| diff.high.neutral.uprightVSinverted |
0.01 |
-0.01 |
0.03 |
7.62 |
| diff.high.irregular.uprightVSinverted |
0.00 |
0.00 |
0.01 |
7.57 |
| diff.low.angry.uprightVSinverted |
0.01 |
0.00 |
0.02 |
10.15 |
| diff.low.neutral.uprightVSinverted |
0.01 |
-0.01 |
0.02 |
2.63 |
| diff.low.irregular.uprightVSinverted |
0.00 |
-0.01 |
0.01 |
1.90 |
| diff.high.upright.angryVSneutral |
-0.02 |
-0.04 |
0.01 |
10.83 |
| diff.high.upright.angryVSirregular |
0.03 |
0.02 |
0.04 |
Inf |
| diff.high.upright.neutralVSirregular |
0.05 |
0.03 |
0.07 |
15999.00 |
| diff.low.upright.angryVSneutral |
-0.01 |
-0.02 |
0.01 |
6.57 |
| diff.low.upright.angryVSirregular |
0.02 |
0.01 |
0.03 |
245.15 |
| diff.low.upright.neutralVSirregular |
0.03 |
0.01 |
0.05 |
1141.86 |
| diff.high.inverted.angryVSneutral |
-0.01 |
-0.03 |
0.00 |
16.72 |
| diff.high.inverted.angryVSirregular |
0.03 |
0.02 |
0.04 |
Inf |
| diff.high.inverted.neutralVSirregular |
0.04 |
0.03 |
0.05 |
Inf |
| diff.low.inverted.angryVSneutral |
-0.01 |
-0.02 |
0.00 |
102.90 |
| diff.low.inverted.angryVSirregular |
0.01 |
0.00 |
0.02 |
409.26 |
| diff.low.inverted.neutralVSirregular |
0.03 |
0.01 |
0.04 |
Inf |
| diff.upright.angry.highVSlow |
0.01 |
0.00 |
0.03 |
30.37 |
| diff.upright.neutral.highVSlow |
0.02 |
0.00 |
0.04 |
39.51 |
| diff.upright.irregular.highVSlow |
0.00 |
-0.01 |
0.01 |
1.56 |
| diff.inverted.angry.highVSlow |
0.01 |
0.00 |
0.02 |
49.63 |
| diff.inverted.neutral.highVSlow |
0.01 |
0.00 |
0.03 |
23.46 |
| diff.inverted.irregular.highVSlow |
0.00 |
-0.01 |
0.01 |
1.88 |
### CSs higher than noise? ###
exp1.posterior.test.VS.0 <- filter(
exp1.posterior.test,
condition == c(
"upright angry high", "upright neutral high", "upright irregular high",
"upright angry low", "upright neutral low", "upright irregular low",
"inverted angry high", "inverted neutral high", "inverted irregular high",
"inverted angry low", "inverted neutral low", "inverted irregular low"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(exp1.posterior.test.VS.0$condition))) {
temp.data <- filter(exp1.posterior.test.VS.0, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}


### Paired comparisons ###
### orientation
exp1.posterior.test.orientation <- filter(
exp1.posterior.test,
condition == c(
"diff.high.angry.uprightVSinverted",
"diff.high.neutral.uprightVSinverted",
"diff.high.irregular.uprightVSinverted",
"diff.low.angry.uprightVSinverted",
"diff.low.neutral.uprightVSinverted",
"diff.low.irregular.uprightVSinverted"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(exp1.posterior.test.orientation$condition))) {
temp.data <- filter(exp1.posterior.test.orientation, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

### regularity
exp1.posterior.test.regularity <- filter(
exp1.posterior.test,
condition == c(
"diff.high.upright.angryVSneutral",
"diff.high.upright.angryVSirregular",
"diff.high.upright.neutralVSirregular",
"diff.low.upright.angryVSneutral",
"diff.low.upright.angryVSirregular",
"diff.low.upright.neutralVSirregular",
"diff.high.inverted.angryVSneutral",
"diff.high.inverted.angryVSirregular",
"diff.high.inverted.neutralVSirregular",
"diff.low.inverted.angryVSneutral",
"diff.low.inverted.angryVSirregular",
"diff.low.inverted.neutralVSirregular"
)
) %>%
droplevels()
par(mfrow = c(4, 3))
for (i in 1:length(levels(exp1.posterior.test.regularity$condition))) {
temp.data <- filter(exp1.posterior.test.regularity, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

### variability
exp1.posterior.test.variability <- filter(
exp1.posterior.test,
condition == c(
"diff.upright.angry.highVSlow",
"diff.upright.neutral.highVSlow",
"diff.upright.irregular.highVSlow",
"diff.inverted.angry.highVSlow",
"diff.inverted.neutral.highVSlow",
"diff.inverted.irregular.highVSlow"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(exp1.posterior.test.variability$condition))) {
temp.data <- filter(exp1.posterior.test.variability, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

Take-home messages:
- comparison with 0
- upright angry and neutral faces elicit SSR larger than noise, in all orientations and within-identity emotion variabilities
- irregular faces elicit SSR not distinguishable from noise, in all orientations and within-identity emotion variabilities
- paired comparisons:
- orientation
- upright and inverted faces elicit similar SSR in all regularities and within-identity emotion variabilities
- regularity
- angry and neutral faces elicit larger SSR than irregular faces, in all orientations and within-identity emotion variabilities
- neutral faces elicit larger SSR than angry faces only when inverted and within-identity emotion variability is low
- within-identity emotion variability
- angry faces elicit larger SSR when within-identity emotion variability is high, in both orientations
- neutral faces elicit larger SSR when variability is high, in both orientations
- irregular faces elicit similar SSR in high and low variability, in both orientations
Exp 2
- flickering frequency: 6 Hz
- regularity: 2 Hz
- 2 face identities
- task: passive viewing
# subset data
EmoSSR.exp2 <- EmoSSR.data %>%
filter(experiment == "exp2")
exp2.model <- brm(CS ~ 0 + condition # constant effects
+ (0 + condition | participant), # varying effects
data = EmoSSR.exp2, # subset data current experiment
family = gaussian(), # likelihood function
prior = weak.priors, # priors
sample_prior = TRUE, # draw samples from the prior distribution
inits = "random", # initial parameter values in the chains
control = list(
adapt_delta = .99, # parameters of NUTS sampler
max_treedepth = 15
),
chains = num.chains, # number of chains
iter = num.iter, # number of iterations
warmup = num.warmup, # number of warm-up samples
thin = num.thin, # thinning rate
algorithm = "sampling", # type of sampling algorithm
cores = num.chains, # number of processor cores to use when running chains in parallel
seed = seed.smorfia # RNG seed
)
saveRDS(exp2.model, file = "exp2_model.rds", compress = "gzip") # save results
# subset data
EmoSSR.exp2 <- EmoSSR.data %>%
filter(experiment == "exp2")
# load model
exp2.model <- readRDS("exp2_model.rds")
# summary posterior distributions & diagnostics
summary.exp2.model <-
describe_posterior(exp2.model,
centrality = "mean",
ci = 0.95,
ci_method = "hdi",
test = NULL,
diagnostic = "all"
) %>%
mutate(
Parameter = gsub("b_condition", "", Parameter),
Parameter2 = gsub("_", " ", Parameter),
condition = factor(Parameter2,
levels =
c(
"upright angry high", "upright neutral high", "upright irregular high",
"upright angry low", "upright neutral low", "upright irregular low",
"inverted angry high", "inverted neutral high", "inverted irregular high",
"inverted angry low", "inverted neutral low", "inverted irregular low"
)
)
) %>%
dplyr::select(Parameter, Mean, HDI95_Low = CI_low, HDI95_High = CI_high, Estimated_Sample_Size = ESS, MonteCarlo_StdErr = MCSE)
kable(summary.exp2.model, digits = 2)
| inverted_angry_high |
0.03 |
0.02 |
0.04 |
6558 |
0 |
| inverted_angry_low |
0.01 |
0.00 |
0.02 |
10806 |
0 |
| inverted_irregular_high |
0.00 |
0.00 |
0.01 |
12659 |
0 |
| inverted_irregular_high |
0.00 |
0.00 |
0.01 |
12659 |
0 |
| inverted_irregular_low |
0.00 |
-0.01 |
0.00 |
12463 |
0 |
| inverted_irregular_low |
0.00 |
-0.01 |
0.00 |
12463 |
0 |
| inverted_neutral_high |
0.05 |
0.03 |
0.06 |
10526 |
0 |
| inverted_neutral_low |
0.01 |
0.01 |
0.02 |
13144 |
0 |
| upright_angry_high |
0.03 |
0.02 |
0.05 |
10554 |
0 |
| upright_angry_low |
0.02 |
0.00 |
0.03 |
11366 |
0 |
| upright_irregular_high |
0.00 |
-0.01 |
0.00 |
12514 |
0 |
| upright_irregular_high |
0.00 |
-0.01 |
0.00 |
12514 |
0 |
| upright_irregular_low |
0.01 |
0.00 |
0.02 |
12340 |
0 |
| upright_irregular_low |
0.01 |
0.00 |
0.02 |
12340 |
0 |
| upright_neutral_high |
0.06 |
0.04 |
0.08 |
13483 |
0 |
| upright_neutral_low |
0.02 |
0.02 |
0.03 |
13070 |
0 |
# MCMC chains
exp2.model %>%
spread_draws(`b_.*`, regex = TRUE) %>%
dplyr::select(
"Chain" = ".chain",
"upright angry high" = "b_conditionupright_angry_high",
"upright neutral high" = "b_conditionupright_neutral_high",
"upright irregular high" = "b_conditionupright_irregular_high",
"upright angry low" = "b_conditionupright_angry_low",
"upright neutral low" = "b_conditionupright_neutral_low",
"upright irregular low" = "b_conditionupright_irregular_low",
"inverted angry high" = "b_conditioninverted_angry_high",
"inverted neutral high" = "b_conditioninverted_neutral_high",
"inverted irregular high" = "b_conditioninverted_irregular_high",
"inverted angry low" = "b_conditioninverted_angry_low",
"inverted neutral low" = "b_conditioninverted_neutral_low",
"inverted irregular low" = "b_conditioninverted_irregular_low"
) %>%
as.data.frame() %>%
mcmc_trace(facet_args = list(ncol = 3)) +
geom_vline(
xintercept = seq(0, 2000, 500),
linetype = "dotted",
colour = "#999999",
size = .8,
alpha = .5
) +
ggtitle("chain convergence") +
theme_EmoSSR +
theme(legend.position = "none")


exp2.posterior.test <- exp2.model %>%
spread_draws(`b_.*`, regex = TRUE) %>%
dplyr::select(
"upright angry high" = "b_conditionupright_angry_high",
"upright neutral high" = "b_conditionupright_neutral_high",
"upright irregular high" = "b_conditionupright_irregular_high",
"upright angry low" = "b_conditionupright_angry_low",
"upright neutral low" = "b_conditionupright_neutral_low",
"upright irregular low" = "b_conditionupright_irregular_low",
"inverted angry high" = "b_conditioninverted_angry_high",
"inverted neutral high" = "b_conditioninverted_neutral_high",
"inverted irregular high" = "b_conditioninverted_irregular_high",
"inverted angry low" = "b_conditioninverted_angry_low",
"inverted neutral low" = "b_conditioninverted_neutral_low",
"inverted irregular low" = "b_conditioninverted_irregular_low"
) %>%
mutate(
### orientation
# angry high
diff.high.angry.uprightVSinverted = `upright angry high` - `inverted angry high`,
# neutral high
diff.high.neutral.uprightVSinverted = `upright neutral high` - `inverted neutral high`,
# irregular high
diff.high.irregular.uprightVSinverted = `upright irregular high` - `inverted irregular high`,
# angry low
diff.low.angry.uprightVSinverted = `upright angry low` - `inverted angry low`,
# neutral high
diff.low.neutral.uprightVSinverted = `upright neutral low` - `inverted neutral low`,
# irregular high
diff.low.irregular.uprightVSinverted = `upright irregular low` - `inverted irregular low`,
### regularity
## upright high
# angry minus neutral
diff.high.upright.angryVSneutral = `upright angry high` - `upright neutral high`,
# angry minus irregular
diff.high.upright.angryVSirregular = `upright angry high` - `upright irregular high`,
# neutral minus irregular
diff.high.upright.neutralVSirregular = `upright neutral high` - `upright irregular high`,
## upright low
# angry minus neutral
diff.low.upright.angryVSneutral = `upright angry low` - `upright neutral low`,
# angry minus irregular
diff.low.upright.angryVSirregular = `upright angry low` - `upright irregular low`,
# neutral minus irregular
diff.low.upright.neutralVSirregular = `upright neutral low` - `upright irregular low`,
## inverted high
# angry minus neutral
diff.high.inverted.angryVSneutral = `inverted angry high` - `inverted neutral high`,
# angry minus irregular
diff.high.inverted.angryVSirregular = `inverted angry high` - `inverted irregular high`,
# neutral minus irregular
diff.high.inverted.neutralVSirregular = `inverted neutral high` - `inverted irregular high`,
## inverted low
# angry minus neutral
diff.low.inverted.angryVSneutral = `inverted angry low` - `inverted neutral low`,
# angry minus irregular
diff.low.inverted.angryVSirregular = `inverted angry low` - `inverted irregular low`,
# neutral minus irregular
diff.low.inverted.neutralVSirregular = `inverted neutral low` - `inverted irregular low`,
### variability
## upright angry
diff.upright.angry.highVSlow = `upright angry high` - `upright angry low`,
## upright neutral
diff.upright.neutral.highVSlow = `upright neutral high` - `upright neutral low`,
## upright irregular
diff.upright.irregular.highVSlow = `upright irregular high` - `upright irregular low`,
## inverted angry
diff.inverted.angry.highVSlow = `inverted angry high` - `inverted angry low`,
## inverted neutral
diff.inverted.neutral.highVSlow = `inverted neutral high` - `inverted neutral low`,
## inverted irregular
diff.inverted.irregular.highVSlow = `inverted irregular high` - `inverted irregular low`
) %>%
gather(key = "condition", value = "CS") %>%
mutate(condition = factor(condition,
levels = c(
"upright angry high", "upright neutral high", "upright irregular high",
"upright angry low", "upright neutral low", "upright irregular low",
"inverted angry high", "inverted neutral high", "inverted irregular high",
"inverted angry low", "inverted neutral low", "inverted irregular low",
"diff.high.angry.uprightVSinverted",
"diff.high.neutral.uprightVSinverted",
"diff.high.irregular.uprightVSinverted",
"diff.low.angry.uprightVSinverted",
"diff.low.neutral.uprightVSinverted",
"diff.low.irregular.uprightVSinverted",
"diff.high.upright.angryVSneutral",
"diff.high.upright.angryVSirregular",
"diff.high.upright.neutralVSirregular",
"diff.low.upright.angryVSneutral",
"diff.low.upright.angryVSirregular",
"diff.low.upright.neutralVSirregular",
"diff.high.inverted.angryVSneutral",
"diff.high.inverted.angryVSirregular",
"diff.high.inverted.neutralVSirregular",
"diff.low.inverted.angryVSneutral",
"diff.low.inverted.angryVSirregular",
"diff.low.inverted.neutralVSirregular",
"diff.upright.angry.highVSlow",
"diff.upright.neutral.highVSlow",
"diff.upright.irregular.highVSlow",
"diff.inverted.angry.highVSlow",
"diff.inverted.neutral.highVSlow",
"diff.inverted.irregular.highVSlow"
)
))
# summary
summary.exp2.posterior.test <- exp2.posterior.test %>%
group_by(condition) %>%
dplyr::summarize(
mean = mean(CS),
hdi.95.low = hdi(CS)[1],
hdi.95.high = hdi(CS)[2],
evidence.ratio = ifelse(mean < 0,
length(which(CS < 0)) / length(which(CS > 0)),
length(which(CS > 0)) / length(which(CS < 0))
)
) %>%
ungroup()
kable(summary.exp2.posterior.test, digits = 2)
| upright angry high |
0.03 |
0.02 |
0.05 |
Inf |
| upright neutral high |
0.06 |
0.04 |
0.08 |
Inf |
| upright irregular high |
0.00 |
-0.01 |
0.00 |
7.62 |
| upright angry low |
0.02 |
0.00 |
0.03 |
257.06 |
| upright neutral low |
0.02 |
0.02 |
0.03 |
Inf |
| upright irregular low |
0.01 |
0.00 |
0.02 |
44.58 |
| inverted angry high |
0.03 |
0.02 |
0.04 |
Inf |
| inverted neutral high |
0.05 |
0.03 |
0.06 |
Inf |
| inverted irregular high |
0.00 |
0.00 |
0.01 |
7.26 |
| inverted angry low |
0.01 |
0.00 |
0.02 |
591.59 |
| inverted neutral low |
0.01 |
0.01 |
0.02 |
1999.00 |
| inverted irregular low |
0.00 |
-0.01 |
0.00 |
4.63 |
| diff.high.angry.uprightVSinverted |
0.00 |
-0.01 |
0.02 |
1.66 |
| diff.high.neutral.uprightVSinverted |
0.01 |
-0.01 |
0.03 |
11.44 |
| diff.high.irregular.uprightVSinverted |
-0.01 |
-0.01 |
0.00 |
18.39 |
| diff.low.angry.uprightVSinverted |
0.00 |
-0.01 |
0.02 |
1.89 |
| diff.low.neutral.uprightVSinverted |
0.01 |
0.00 |
0.02 |
75.56 |
| diff.low.irregular.uprightVSinverted |
0.01 |
0.00 |
0.02 |
59.61 |
| diff.high.upright.angryVSneutral |
-0.03 |
-0.05 |
-0.01 |
107.11 |
| diff.high.upright.angryVSirregular |
0.04 |
0.02 |
0.05 |
Inf |
| diff.high.upright.neutralVSirregular |
0.06 |
0.05 |
0.08 |
Inf |
| diff.low.upright.angryVSneutral |
-0.01 |
-0.02 |
0.00 |
9.51 |
| diff.low.upright.angryVSirregular |
0.01 |
-0.01 |
0.02 |
3.35 |
| diff.low.upright.neutralVSirregular |
0.02 |
0.00 |
0.03 |
189.48 |
| diff.high.inverted.angryVSneutral |
-0.01 |
-0.03 |
0.00 |
17.14 |
| diff.high.inverted.angryVSirregular |
0.03 |
0.01 |
0.04 |
15999.00 |
| diff.high.inverted.neutralVSirregular |
0.04 |
0.03 |
0.06 |
Inf |
| diff.low.inverted.angryVSneutral |
0.00 |
-0.01 |
0.01 |
1.03 |
| diff.low.inverted.angryVSirregular |
0.01 |
0.01 |
0.02 |
940.18 |
| diff.low.inverted.neutralVSirregular |
0.01 |
0.01 |
0.02 |
2284.71 |
| diff.upright.angry.highVSlow |
0.02 |
0.00 |
0.04 |
42.24 |
| diff.upright.neutral.highVSlow |
0.04 |
0.02 |
0.05 |
2284.71 |
| diff.upright.irregular.highVSlow |
-0.01 |
-0.02 |
0.00 |
94.24 |
| diff.inverted.angry.highVSlow |
0.02 |
0.01 |
0.03 |
362.64 |
| diff.inverted.neutral.highVSlow |
0.03 |
0.02 |
0.05 |
3199.00 |
| diff.inverted.irregular.highVSlow |
0.00 |
0.00 |
0.01 |
12.75 |
### CSs higher than noise? ###
exp2.posterior.test.VS.0 <- filter(
exp2.posterior.test,
condition == c(
"upright angry high", "upright neutral high", "upright irregular high",
"upright angry low", "upright neutral low", "upright irregular low",
"inverted angry high", "inverted neutral high", "inverted irregular high",
"inverted angry low", "inverted neutral low", "inverted irregular low"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(exp2.posterior.test.VS.0$condition))) {
temp.data <- filter(exp2.posterior.test.VS.0, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}


### Paired comparisons ###
### orientation
exp2.posterior.test.orientation <- filter(
exp2.posterior.test,
condition == c(
"diff.high.angry.uprightVSinverted",
"diff.high.neutral.uprightVSinverted",
"diff.high.irregular.uprightVSinverted",
"diff.low.angry.uprightVSinverted",
"diff.low.neutral.uprightVSinverted",
"diff.low.irregular.uprightVSinverted"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(exp2.posterior.test.orientation$condition))) {
temp.data <- filter(exp2.posterior.test.orientation, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

### regularity
exp2.posterior.test.regularity <- filter(
exp2.posterior.test,
condition == c(
"diff.high.upright.angryVSneutral",
"diff.high.upright.angryVSirregular",
"diff.high.upright.neutralVSirregular",
"diff.low.upright.angryVSneutral",
"diff.low.upright.angryVSirregular",
"diff.low.upright.neutralVSirregular",
"diff.high.inverted.angryVSneutral",
"diff.high.inverted.angryVSirregular",
"diff.high.inverted.neutralVSirregular",
"diff.low.inverted.angryVSneutral",
"diff.low.inverted.angryVSirregular",
"diff.low.inverted.neutralVSirregular"
)
) %>%
droplevels()
par(mfrow = c(4, 3))
for (i in 1:length(levels(exp2.posterior.test.regularity$condition))) {
temp.data <- filter(exp2.posterior.test.regularity, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

### variability
exp2.posterior.test.variability <- filter(
exp2.posterior.test,
condition == c(
"diff.upright.angry.highVSlow",
"diff.upright.neutral.highVSlow",
"diff.upright.irregular.highVSlow",
"diff.inverted.angry.highVSlow",
"diff.inverted.neutral.highVSlow",
"diff.inverted.irregular.highVSlow"
)
) %>%
droplevels()
par(mfrow = c(2, 3))
for (i in 1:length(levels(exp2.posterior.test.variability$condition))) {
temp.data <- filter(exp2.posterior.test.variability, condition == levels(condition)[i])
plotPost(
pull(temp.data, CS),
credMass = 0.95,
compVal = 0,
ROPE = NULL,
xlab = "",
col = "#b3cde0",
showCurve = FALSE,
cex = 1,
main = levels(temp.data$condition)[i]
)
}

Take-home messages:
- comparison with 0
- upright angry and neutral faces elicit SSR larger than noise, in all orientations and within-identity emotion variabilities
- upright irregular faces elicit SSR slightly larger than noise only when within-identity emotion variability is low
- all other irregular faces elicit SSR not distinguishable from noise
- paired comparisons:
- orientation
- upright and inverted faces elicit similar SSR in all regularities and within-identity emotion variabilities
- neutral and irregular faces elicit slightly larger SSR when upright compared to inverted only when within-identity emotion variability is low
- regularity
- angry and neutral faces elicit larger SSR than irregular faces, in all orientations and within-identity emotion variabilities (exception: angry and irregular faces elicit similar SSR when upright and within-identity emotion variability is low)
- neutral faces elicit larger SSR than angry faces only when upright and within-identity emotion variability is high
- within-identity emotion variability
- angry faces elicit larger SSR when within-identity emotion variability is high, in both orientations
- neutral faces elicit larger SSR when variability is high, in both orientations
- irregular faces elicit larger SSR in high and low variability when inverted